/**
 * Created by Dalyn on 2017/5/11.
 */
import Relay from "react-relay";
export default class GetChildsGoodsMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { getChildsGoods }`;
    }

    getVariables() {
        return {
            argsInput: {
                pageSize: this.props.pageSize,
                pageNum: this.props.pageNum,
                orderId: this.props.orderId,
                orderType: this.props.orderType,
            }
        }
    }

    getFatQuery() {
        return Relay.QL`fragment on getChildsGoodsPayload{
            getChildsGoods {
                errorCode
                value
                totalResult
                id
                orderGoodss{
                    gid
                    orderId
                    partBName
                    productName
                    orderType
                    specification
                    quantity
                    acceptQuantity
                    productionDesp
                    prickle
                    colour
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
               fragment on getChildsGoodsPayload  {
                    getChildsGoods {
                        errorCode
                        value
                        totalResult
                        id
                        orderGoodss{
                          gid
                          orderId
                          partBName
                          productName
                          orderType
                          specification
                          quantity
                          acceptQuantity
                          productionDesp
                          prickle
                          colour
                        }
                    }
                 }
            `]
        }];
    }

}
